/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/04/30
* File: EffectTechnique.cpp
* Blog: http://www.cnblogs.com/zengqh/
**/

#include "EffectTechnique.h"

namespace HY
{
Effect* EffectTechnique::getEffect() const
{
	return fx_;
}

const std::string& EffectTechnique::getName() const
{
	return name_;
}

uint32 EffectTechnique::getNumOfPasses() const
{
	eff_pass_list_.size();
}

EffectPass* EffectTechnique::createPass(const std::string& name)
{
	EffectPass* pass = new EffectPass(this, name);
	eff_pass_list_.push_back(pass);

	return pass;
}

EffectPass* EffectTechnique::getPass(uint32 idx) const
{
	HY_ASSERT(idx >= 0 && idx < eff_pass_list_.SIZE());

	return eff_pass_list_[idx];
}

}